package com.zsrt.java.day20161226.wrl.day161226.homework;

import java.util.Scanner;

public class ClassDemo {
	
	public static void main(String[] args) {
		double a , b , c;
		Scanner sc = new Scanner(System.in);
		System.out.println("请输入3个数字：");
		a = sc.nextDouble();
		b = sc.nextDouble();
		c = sc.nextDouble();
		sc.close();
		double xx = xx(a,b,c);
		System.out.println(a+" + "+b+" + "+c+" = "+xx);
	}
	
	/**
	 * 1.计算3个double数相加的和
	 * 
	 * @param a	加数1
	 * @param b	加数2
	 * @param c	加数3
	 * @return	3个数相加的和
	 */
	public static double xx(double a,double b,double c){
		double result = a + b + c;
		return result;
	}

}
